#include"types.h"

//读取CPU状态，确定是否开中断
static inline uint readeflags(void){
    uint eflags;
    asm volatile(
        "pushfl"
        "popl %0" 
        : "=r" (eflags));
    return eflags;
}
//关中断
static inline void cli(void)
{
  asm volatile("cli");
}
//开中断
static inline void sti(void)
{
  asm volatile("sti");
}
